package com.fenghongzhang.module_home

import android.os.Bundle
import android.util.Log
import android.view.MotionEvent
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.alibaba.android.arouter.facade.annotation.Route
import com.fenghongzhang.lib_common.utils.Router
private const val TAG = "HomeActivity"

@Route(path = Router.Ui.HomeActivity)
class HomeActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_home)

    }

    override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
        Log.i(TAG, "dispatchTouchEvent: ")
        Log.i(TAG, "dispatchTouchEvent: ${ev?.action}")
        when (ev?.action) {
            MotionEvent.ACTION_DOWN -> {
                Log.i(TAG, "dispatchTouchEvent: ACTION_DOWN")
            }
            MotionEvent.ACTION_MOVE -> {
                Log.i(TAG, "dispatchTouchEvent: ACTION_MOVE")
            }
            MotionEvent.ACTION_UP -> {
                Log.i(TAG, "dispatchTouchEvent: ACTION_UP")
            }
            MotionEvent.ACTION_CANCEL -> {
                Log.i(TAG, "dispatchTouchEvent: ACTION_CANCEL")
            }

        }
        return super.dispatchTouchEvent(ev)
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        Log.i(TAG, "onTouchEvent: ")
        return super.onTouchEvent(event)
    }
}